// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import Vant from 'vant';
import App from './App'
import router from './router'
import promise from 'es6-promise';
promise.polyfill();



import 'vant/lib/vant-css/index.css';

Vue.use(Vant);

/*全局注册*/
import "./register/";
import "@/utils/prototype.js"

// 路由导航
router.beforeEach((to, from, next) => {
  // 如果路由有这个title 的值就给设置上去
  if (to.meta.title) {
    document.title = to.meta.title
  } else {
    document.title = '星诊所'
  }
  next()
});

Vue.config.productionTip = false


import { AlertPlugin, ConfirmPlugin, LoadingPlugin, ToastPlugin } from "vux";
Vue.use(AlertPlugin);
Vue.use(ConfirmPlugin);
Vue.use(LoadingPlugin);
Vue.use(ToastPlugin);
// 或者umd方式
// 引入构建的js文件

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
